<?php

namespace common\models\clinic;

use Yii;

/**
 * This is the model class for table "{{%clinic_user_treatment_wait}}".
 *
 * @property int $id
 * @property int|null $project_id 项目id
 * @property string|null $patient_card_id 诊疗号
 * @property int|null $clinic_project_id 治疗项目id
 * @property string|null $clinic_project_name 治疗项目名
 * @property int|null $operate_id 操作人id
 * @property string|null $operate_name 操作人姓名
 * @property int|null $treatment_id by_clinic_user_treatment表id
 * @property int|null $template 调用的治疗模板
 * @property int|null $status 0 = 待录入,  1 = 已录入 ,2 = 已过期, 3 = 治疗列表录入
 * @property int|null $created_at 创建时间
 * @property int|null $updated_at 更新时间
 */
class UserTreatmentWait extends \common\models\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%clinic_user_treatment_wait}}';
    }

    const STATUS_DELETE = -1; // 删除
    const STATUS_WAIT = 0;// 待录入
    const STATUS_ENABLE = 1;// 已录入

    public static $statuss = [
        self::STATUS_WAIT => '待录入',
        self::STATUS_ENABLE => '已录入',
    ];


    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['project_id', 'clinic_project_id', 'operate_id', 'treatment_id', 'template', 'status', 'created_at', 'updated_at'], 'integer'],
            [['patient_card_id', 'clinic_project_name', 'operate_name'], 'string', 'max' => 50],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'project_id' => 'Project ID',
            'patient_card_id' => 'Patient Card ID',
            'clinic_project_id' => 'Clinic Project ID',
            'clinic_project_name' => 'Clinic Project Name',
            'operate_id' => 'Operate ID',
            'operate_name' => 'Operate Name',
            'treatment_id' => 'Treatment ID',
            'template' => 'Template',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
